<template lang="html">
  <svg v-if="iconId" class="svgicon icon" aria-hidden="true">
    <use :xlink:href="iconId"></use>
  </svg>
</template>

<script>
export default {
  name: 'icon',
  props: {
    id: {
      type: String,
      default: ''
    }
  },
  computed: {
    iconId () {
      return this.id ? `#${this.id}` : '';
    }
  }
};
</script>
